<template>
  <div class="my_input">
    <input type="text" :value="modelValue" @input="$emit('update:modelValue',$event.target.value)" placeholder="输入学校、商务楼、地址" @keydown.enter="$emit('search')">
    <button @click="$emit('search')">提交</button>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
export default {
  props:{
    modelValue:[Number,String]
  },
  setup() {

  },
};
</script>
<style lang="scss" scoped>
.my_input{
  padding: 10px 20px;
  background: #fff;
  margin-top: 10px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  input{
    width: 100%;
    border-radius: 5px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    height: 30px;
    padding: 0 10px;
    box-sizing: border-box;
  }
  button{
      width: 100%;
      color: #fff;
      background: #2a74f5;
      text-align: center;
      border: none;
      height: 30px;
  }
}
</style>